package com.erp.purchase.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.erp.common.annotation.Excel;
import com.erp.common.core.domain.BaseEntity;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 采购订单明细对象 erp_pur_order_item
 *
 * @author ruoyi
 * @date 2025-09-05
 */
@Data
public class PurOrderItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 明细ID */
    private Long id;

    /** 订单ID（关联purchase_order表） */
    @Excel(name = "订单ID", readConverterExp = "关=联purchase_order表")
    private Long orderId;

    /** 商品ID（关联product表） */
    @Excel(name = "商品ID", readConverterExp = "关=联product表")
    private Long productId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String productName;

    /** 商品规格 */
    @Excel(name = "商品规格")
    private String specification;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String unit;

    /** 采购数量 */
    @Excel(name = "采购数量")
    private BigDecimal purchaseQuantity;

    /** 实际采购数量 */
    @Excel(name = "实际采购数量")
    private BigDecimal actualQuantity;

    /** 采购单价 */
    @Excel(name = "采购单价")
    private BigDecimal unitPrice;

    /** 金额（采购数量*单价） */
    @Excel(name = "金额", readConverterExp = "采=购数量*单价")
    private BigDecimal amount;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    /** 是否删除：0-未删除，1-已删除 */
    @Excel(name = "是否删除：0-未删除，1-已删除")
    private Integer isDeleted;

}
